import Vue from "vue";
import vueclipboard from 'vue-clipboard'

Vue.use(vueclipboard)

export default {
    install(vue, opstion) {
        //把方法写在vue原型方便调用
        Vue.prototype.$copy = function (value) {
            this.$copytext(
                `${value}`
            ).then(res => {
                    this.$msg.success("复制成功")
                },
                err => {
                    this.$msg.error("复制失败");
                }
            );
        }
    }
}